load("//tools:defaults.bzl", "ng_module", "ng_test_library", "ng_web_test_suite")

package(default_visibility = ["//visibility:public"])

ng_module(
    name = "testing",
    srcs = glob(
        ["**/*.ts"],
        exclude = ["**/*.spec.ts"],
    ),
    module_name = "@angular/material/icon/testing",
    deps = [
        "//src/cdk/coercion",
        "//src/cdk/testing",
        "//src/material/icon",
        "@npm//@angular/common",
        "@npm//@angular/core",
        "@npm//rxjs",
    ],
)

filegroup(
    name = "source-files",
    srcs = glob(["**/*.ts"]),
)

ng_test_library(
    name = "harness_tests_lib",
    srcs = ["shared.spec.ts"],
    deps = [
        ":testing",
        "//src/cdk/platform",
        "//src/cdk/testing",
        "//src/cdk/testing/testbed",
        "//src/material/icon",
        "@npm//@angular/platform-browser",
    ],
)

ng_test_library(
    name = "unit_tests_lib",
    srcs = glob(
        ["**/*.spec.ts"],
        exclude = [
            "**/*.e2e.spec.ts",
            "shared.spec.ts",
        ],
    ),
    deps = [
        ":harness_tests_lib",
        ":testing",
        "//src/material/icon",
    ],
)

ng_web_test_suite(
    name = "unit_tests",
    deps = [":unit_tests_lib"],
)
